/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package ged.impl;

import ged.GedPackage;
import ged.LineWidth;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Line Width</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link ged.impl.LineWidthImpl#getLwidth <em>Lwidth</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class LineWidthImpl extends EObjectImpl implements LineWidth
{
  /**
   * The default value of the '{@link #getLwidth() <em>Lwidth</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getLwidth()
   * @generated
   * @ordered
   */
  protected static final int LWIDTH_EDEFAULT = 0;

  /**
   * The cached value of the '{@link #getLwidth() <em>Lwidth</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getLwidth()
   * @generated
   * @ordered
   */
  protected int lwidth = LWIDTH_EDEFAULT;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected LineWidthImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  protected EClass eStaticClass()
  {
    return GedPackage.Literals.LINE_WIDTH;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public int getLwidth()
  {
    return lwidth;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setLwidth(int newLwidth)
  {
    int oldLwidth = lwidth;
    lwidth = newLwidth;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, GedPackage.LINE_WIDTH__LWIDTH, oldLwidth, lwidth));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
      case GedPackage.LINE_WIDTH__LWIDTH:
        return getLwidth();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
      case GedPackage.LINE_WIDTH__LWIDTH:
        setLwidth((Integer)newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
      case GedPackage.LINE_WIDTH__LWIDTH:
        setLwidth(LWIDTH_EDEFAULT);
        return;
    }
    super.eUnset(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
      case GedPackage.LINE_WIDTH__LWIDTH:
        return lwidth != LWIDTH_EDEFAULT;
    }
    return super.eIsSet(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public String toString()
  {
    if (eIsProxy()) return super.toString();

    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (lwidth: ");
    result.append(lwidth);
    result.append(')');
    return result.toString();
  }

} //LineWidthImpl
